package com.cjb.cloudsystem.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.cjb.cloudsystem.convert.SysLogLoginOperationConvert;
import com.cjb.cloudsystem.convert.SysLogLoginStatusConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * @Author chenjinbin
 * @Package IntelliJ IDEA
 * @Class SysLogLoginExcel
 * @Date 2024-01-24 下午9:11
 */

@Data
@Schema(description = "登录日志导出Excel实体类")
public class SysLogLoginExcel {

    /**
     * 用户名
     */
    @ExcelProperty(index = 0, value = "用户名")
    private String username;

    /**
     * 登录IP
     */
    @ExcelProperty(index = 1, value = "登录IP")
    private String ip;

    /**
     * 登录地点
     */
    @ExcelProperty(index = 2, value = "登录地点")
    private String address;

    /**
     * User Agent
     */
    @ExcelProperty(index = 3, value = "设备机型")
    private String userAgent;

    /**
     * 登录状态  0：失败   1：成功
     */
    @ExcelProperty(index = 4, value = "登录状态",converter = SysLogLoginStatusConvert.class)
    private Integer status;

    /**
     * 操作信息   0：登录成功   1：退出成功  2：验证码错误  3：账号密码错误
     */
    @ExcelProperty(index = 5, value = "操作信息",converter = SysLogLoginOperationConvert.class)
    private Integer operation;


    /**
     * 创建时间
     */
    @ExcelProperty(index = 6, value = "创建时间")
    private Date createTime;

}
